<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
		"http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>Test switchTo</title>
		<style type="text/css">
			@import "../../../dojo/resources/dojo.css";
			@import "../../../dijit/tests/css/dijitTests.css";
		</style>
		<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug: true, async:0, gfxRenderer:'svg,canvas,vml', packageMap:[{name:'doh',location:'util/doh'}]"></script>
		<script type="text/javascript">
			require([
			"doh/runner",
			"dojo/ready",
			"dojo/sniff",
			"dojo/aspect",
			"dojox/gfx",
			"dojox/gfx/shape"],
			function(doh, ready, has, aspect, gfx, gfxshape, svg, canvas){
				
				ready(function(){
					var surface, newRenderer;
					
					doh.register("switchTo", [
						{
							name: "switchTo(object)",
							timeout: 1000,
							setUp: function(){
							},
							runTest: function(t){
								if(gfx.renderer == "vml") return;
								var r = gfx.renderer == "svg" ? "canvasWithEvents" : "svg";
								require(["dojox/gfx/" + r], function(){});
								gfx.switchTo(gfx[r]);
								t.t(gfx.Surface === gfx[r].Surface, "Unexpected Surface type.");
								t.t(gfx.renderer === r, "Unexpected renderer.");
							}
						},
						{
							name: "switchTo(string)",
							timeout: 1000,
							setUp: function(){
							},
							runTest: function(t){
								if(gfx.renderer == "vml") return;
								var r = gfx.renderer == "svg" ? "canvasWithEvents" : "svg";
								require(["dojox/gfx/" + r], function(){});
								gfx.switchTo(r);
								t.t(gfx.Surface === gfx[r].Surface, "Unexpected Surface type.");
								t.t(gfx.renderer === r, "Unexpected renderer.");
							}
						}
					]);
				doh.run();
			});
		});
		</script>
	</head>
	<body>
		<div id="gfxObject" style="width: 500px; height: 500px;font-weight:bold;"></div>
	</body>
</html>
